The invention relates to input/output control method and apparatus of a virtual machine system which can make different operating systems operative in a plurality of virtual machines which operate on a computer and, more particularly, to input/output control method and apparatus of a virtual machine system for allocating a special one of input/output devices such as a plurality of magnetic disk units or the like to a virtual machine and for executing input/output controls.
In the case where a disk control unit is commonly used by virtual machines which are realized by a plurality of OS and a plurality of input/output devices which are under the domination of the disk control unit, for example, magnetic disk units (hereinafter, simply referred to as "disk units") are allocated to a special virtual machine in a one-to-one corresponding relation and input and output operations are executed, an overhead of the virtual machine system increases and the performance deteriorates.
On the other hand, in the case where one disk unit which are under the domination of the disk control unit are commonly used by a plurality of virtual machines, when a physical access path is specially allocated to only each of the virtual machines, the virtual machines which are commonly used are limited in dependence on the number of physical access paths. There is, accordingly, a method of allocating one physical access path to a plurality of virtual machines.
When one physical access path is allocated to a plurality of virtual machines, however, it is necessary to perform input/output controls to allow the disk control unit and the physical access path to be commonly used by a plurality of virtual machines. An overhead of the virtual machine system increases and the performance deteriorates.
Further, since the disk control unit is constructed on the assumption that the input/output controls are inherently executed by one OS, in the case where it is subjected to the controls by a plurality of virtual machines, the function of the multi access path to improve the performance and the reliability cannot be used. It is demanded to improve such a point.
In the conventional virtual machine system, the disk control unit is connected to a main storage control unit of a main storage unit through a channel device and a plurality of disk units are connected under the domination of the disk control unit.
In this case, a plurality of disk control units can be connected to one channel device. A plurality of disk units can be connected to one disk control unit.
FIG. 1 shows an example of an input/output subsystem in the conventional virtual machine system. In such a system, a plurality of disk units 12-1 and 12-2 are connected under the domination of one disk control unit 14 via two paths. Two channel devices 16-1 and 16-2 are provided in correspondence to virtual machines 10-1 and 10-2 on a main storage unit. The channel devices 16-1 and 16-2 are connected to channel adapters 24-1 and 24-2 of the disk control unit 14. In order to access the disk unit 12-1 or 12-2, the access route certainly passes through the channel device 16-1 or 16-2 and the disk control unit 14 and such a logical coupling path is called an access path. The access path is expressed together with the ID No. (identification number) added to each device.
For example, now assuming that the numbers of the channel devices 16-1 and 16-2 are set to CH1 and CH2 and the channel adapter numbers of the disk control unit 14 are set to CA1 and CA2 and the numbers of the disk units 12-1 and 12-2 are set to DEV-1 and DEV-2, they are expressed by access paths 111, 112, 221 and 222 and denote the following paths.
______________________________________ [access path] [path] ______________________________________ 111 CH1.about.CA1.about.DEV-1 112 CH1.about.CA1.about.DEV-2 221 CH2.about.CA2.about.DEV-1 222 CH2.about.CA2.about.DEV-2 ______________________________________
In case of making the virtual machine system operative by using the input/output construction shown in FIG. 1, there is a form such that the disk units 12-1 and 12-2 under the domination of the disk control unit 14 are allocated to the virtual machines 10-1 and 10-2 in a one-to-one corresponding relation.
In FIG. 1, since the disk unit 12-1 is allocated to the virtual machine 10-1, the access paths 111 and 221 can be used by the virtual machine 10-1. Since the disk unit 12-2 is allocated to the virtual machine 10-2, the access paths 112 and 222 can be used by the virtual machine 10-2.
In case of such a form in which the virtual machine and the disk unit are allocated in a one-to-one corresponding manner, the disk control unit 14 and the channel devices 16-1 and 16-2 are commonly used between a plurality of guest virtual machines 10-1 and 10-2, so that there is an effect from a viewpoint of the effective use of resources.
As a disk control unit 14, there is a disk control unit having a dynamic path recoupling function and an expansion reserving function in order to improve the performance and reliability. As for the dynamic path recoupling function, a recoupling or the like after completion of the seeking operations of the disk units 12-1 and 12-2 is executed from a blank access path, thereby enabling an input/output response time to be reduced, so that the performance is improved. As for the expansion reserving function, when a trouble occurs while the OS is reserving the disk unit 12-1 or 12-2, it is possible to access to the disk unit 12-1 or 12-2 by using another channel, so that the reliability is improved.
To use those functions, it is necessary to form a group by a plurality of access paths for the disk units 12-1 and 12-2. That is, it is sufficient that a point that a plurality of access paths via the disk control unit 14 are used by only one system (one OS) is declared to the disk control unit 14 by a form of the group formation. For example, in the case where the virtual machine 10-1 uses the dynamic path recoupling function and expansion reserving function, the operating system which operates on the virtual machine 10-1 issues a group ID setting command every two access paths 111 and 221 of the disk unit 12-1 allocated to the virtual machine, the same group ID is held in the channel adapters 24-1 and 24-2 of the disk control unit 14, thereby forming a group of the two access paths 111 and 221 for the disk unit 12-1.
FIG. 2 shows a form such that the channel device 16-1, disk control unit 14, and disk unit 12-1 are allocated to the two virtual machines 10-1 and 10-2 and are commonly used. In this case, the access path 111 for the disk unit 12-1 is used by the virtual machines 10-1 and 10-2 and one access path can be commonly used among a plurality of virtual machines, so that there is an effect from a viewpoint of the effective use of resources.
With respect to the form shown in FIG. 2, in a manner similar to the case of FIG. 1, the dynamic path recoupling function and the expansion reserving function are provided for the disk control unit 14 for the purpose of the improvement of the performance and reliability.
However, in an input/output form such that the disk units are allocated to the virtual machines shown in FIG. 1 in a one-to-one corresponding manner and one disk control unit is commonly used by a plurality of virtual machines, there is a problem such that the dynamic path recoupling function and the expansion reserving function which need to form a group of access paths cannot be used. This is because the disk control unit inherently operates on the assumption that an instruction by a channel command word from the channel device is given from one system (one OS), so that the channel command words from a plurality of virtual machines 10-1 and 10-2 as shown in FIG. 1 cannot be distinguished.
In the conventional virtual machine system, therefore, there is used a method whereby in order to prevent that group ID setting commands are generated from a plurality of virtual machines upon activation of the system and the subsequent input/output operations cannot be assured, a monitor program (hereinafter, referred to as a "monitor section") as a software to realize a virtual machine onto a real machine intercepts all of input/output commands which are issued from the virtual machines and simulates the group ID setting commands in the input/output request as errors, thereby rejecting a group forming command.
According to the simulation such that the group ID setting command in the input/output request is set to an error, when the virtual machine issues the input/output command, the monitor unit monitors whether the command is a group ID setting command or not, and when the group ID setting command is detected, the command is rejected.
In the form such that one disk control unit is commonly used by a plurality of virtual machines, consequently, the dynamic path recoupling function and the expansion reserving function which need to form a group of access paths cannot be used, resulting in deterioration of the performance and reliability.
Further, since the monitor section performs an intersection to the I/O command to reject the group ID setting command by the error simulation, there is a problem such that the overhead of the monitor unit increases and the deterioration of the performance is promoted.
On the other hand, in the input/output form such that one disk unit is commonly used by a plurality of virtual machines as shown in FIG. 2, since there is a case where input/output requests are simultaneously issued from the virtual machines 10-1 and 10-2, a function to perform an exclusive control is provided for the disk control unit 14.
Since the disk control unit 14, however, operates on the assumption that an instruction by the channel command word from the channel device 16-1 is given from one system (one OS), when one access path is commonly used by a plurality of systems (a plurality of OS), the exclusive control cannot be executed.
In the conventional system, therefore, in order to simulate an exclusive control command by the monitor section in place of the disk control unit 14, it is necessary to intercept the input/output command and the input/output interruption, so that there is a problem such that the overhead of the monitor section increases and the deterioration of the performance is promoted.
Since the above form is such that one disk unit is commonly used by a plurality of virtual machines in a manner similar to the form of FIG. 1, the dynamic path recoupling function and expansion reserving function which need to form a group of access paths cannot be used, resulting in deterioration of the performance and reliability.